class Payment:
    def pay(self):
        pass


class CreditCardPayment(Payment):
    def pay(self):
        print('使用信用卡支付')


class PayPalPayment(Payment):
    def pay(self):
        print('使用PayPal支付')


if __name__ == '__main__':
    pays = [CreditCardPayment(), PayPalPayment()]
    for pay in pays:
        pay.pay()
